package cn.accp.mvc.dao.impl;

import java.util.List;

import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import cn.accp.mvc.dao.DistrictDao;
import cn.accp.mvc.entity.District;

@Repository("districtDao")
public class DistrictDaoImpl extends SqlSessionDaoSupport implements DistrictDao {
	@Autowired
	@Override
	public void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory) {
		// TODO Auto-generated method stub
		super.setSqlSessionFactory(sqlSessionFactory);
	}
	@Override
	public List<District> getAllDistrict() {
		List<District> districtList = getSqlSession().selectList("getDistrict");
		return districtList;
	}

}
